import { View } from "../../../mvc/core/View";
import { ObjCreate } from "../common/ObjCreate";
import { ImagesConst } from "../../resource/ImagesConst";
import { GTextFormat } from "../../../common/GTextFormat";
import { Language } from "../../../../extend/language/Language";
import { TreasureOverViewNewSp } from "../treasure/TreasureOverViewNewSp";
import { Dispatcher } from "../../../mvc/core/Dispatcher";
import { DataEvent } from "../../events/DataEvent";
import { EventName } from "../../mvc/EventName";
import { GameConst } from "../../../component/gconst/GameConst";
//class DramaLotteryOverviewPanel
    
    export  class DramaLotteryOverviewPanel extends View
    {
        constructor()
        {
            super();
            this.init();
            return;
        }

        /* internal  */init(): void
        {
            var loc1=ObjCreate.createBg(0, 0, 195, 25, this, ImagesConst.TileBg);
            var loc2=new GTextFormat("", 15, 15788607);
            var loc3=ObjCreate.createGTextField(Language.getString(70673), 52, 5, 100, 25, this, loc2);
            this._severSp = new TreasureOverViewNewSp(195, 210);
            this._severSp.y = 26;
            addChild(this._severSp);
            Dispatcher.dispatchEvent(new DataEvent(EventName.DramaLotteryGetExplorerRecords, GameConst.DramaLotteryExplorerType));
            return;
        }

        public /* override */ update(arg1: Object, ... rest): void
        {
            var loc1=arg1 as Array<any>;
            this._severSp.update(loc1);
            this._severSp.maxScrollPosition();
            return;
        }

        /* internal  */onTimerCompleteHandler(arg1: Object /* flash.events.TimerEvent */): void
        {
            return;
        }

        /* internal */ /* var */_severSp: TreasureOverViewNewSp;
    }
